<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<h1>Setup wallet</h1>
Run <code>wallet -h</code> to see all available command line switches.
<br>

<h2>Setup your seed</h2>
Wallet is deterministic and the only thing you need to set it up is the seed password.<br>
As long as you remember the password, you do not need to backup the wallet ever.<br>
You can either enter this password each time when running the wallet, or you can store it in a file called <code>.secret </code>and never be asked to enter it again.<br>
<br>

You do not need to use a memorable password. Instead you can create a random secret seed, e.g. using a command like this:<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;cat /dev/urandom | tr -cd a-zA-Z0-9 | head -c 27 &gt; .secret</code><br>
<i><b>Note:</b> using a password that you cannot memorize, make sure to have a backup of your <code>.secret</code> file. </i>
<i><br>
</i>
<h2>Export public addresses</h2>
After you setup your wallet in a secured environment, you should export its public addresses.<br>
<br>
In order to do this, just run <code>wallet -l</code> and your wallet's public addresses will be written to <code>wallet.txt</code>.<br>
<br>


<h2>Security precautions</h2>
Make sure that the disk with <code>.secret</code> file is encrypted.<br>
<br>

The seed password is the key to your entire wallet and the function used to calculate it is double SHA256<sup>*</sup>, which is pretty easy to compute.<br>
That is why it is very important for you to make sure that the password you're choosing will be resistant to brute force and dictionary attacks.<br>
<br>
If you choose to use a memorable seed-password (aka <i>brain wallet</i>),
make it <u>at least</u> 20 characters long, preferably more than 30.
Use both cases of letters, digits and sepcial characters.
Try to avoid using words that can be found in a dictionary and never use sentences that can be found in Google.<br>
<br>
If you decide to write down the password, because you are affraid of forgetting it,
try to describe it as a puzzle that only you can understad. Avoid writing down the password as is.<br>
<br>

<b>Are brain wallets less secure from those based on a random number generator?</b><br>
It is debatable.<br>
There are people claiming that brain wallets aren't secure because <i>brains cannot be a good source of entropy</i>.<br>
If you have such a brain, make sure to consider this risk (e.g. use a random generator to create the content of the <code>.secret</code> file).<br>
Otherwise coming out with a memorable though <u>uncrackable</u> seed, gives you quite a secure and convenient solution,
as you get rid of backups that are a week point of the wallet's security. On top of that you never have to carry the wallet file with you.<br>
<br>
<hr width="50" align="left">
*) Wallets version 1.10.1 (or higher) support using an optional <b>scrypt</b> function to convert the password into private keys, 
    making your  brain wallet far more resistant to bruteforce attacks.
    See the <code>scrypt</code> config value (inside your <code>wallet.cfg</code> file) for more info.<br>
<br>

<h2>Importing other private keys</h2>
You can import keys from your existing bitcoin wallet, as well as keys generated by other tools (all kind of key/address generators).<br>
<br>

The key that you want to import must be in base58 encoded format, which looks somehow like <code>5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS</code>. To export a private key from the official bitcoin wallet use <code>dumprivkey</code> RPC command. To import such a key into your Gocoin wallet, just store the base58 encoded value in a text file named <code>.others</code> (each key must be in a separate line). You can also place a key's label in each line, after a space.<br>
<br>

The imported keys will extend the key pool of the deterministic ones (that come from your password-seed). After Importing each new key, you should redo <code>wallet -l</code> to get an updated <code>wallet.txt</code> for your client.

<br>

<br>

<hr>

<h2>Optional: setup your node with the wallet file</h2>
Having <b>wallet.txt</b> file generated at the wallet machine, use <b>Wallet</b> page of WebUI and store the content of
this file as a wallet in your browser. You can choose any name you want and you can change labels for the addresses.
</body>
</html>
